A. Technical Field
The present invention relates generally to storage devices, and more particularly, to the method for defining capacity for a disk drive.
B. Background of the Invention
Disk arrays comprising multiple disk drives have emerged as a low cost alternative to the use of single large disks for non-volatile storage of information. The disk array when coupled to a host system, offers great improvements in performance, reliability, power consumption and scalability over a single large magnetic disk. An example of such a disk array is a Redundant Array of Independent Disks (hereinafter “RAID”). The use of multiple drives within such an array allows the recordation of redundant information on the disk drives so that lost data may be reconstructed in the event of a drive failure. Although the data may be recovered, a failed drive is often required to be replaced by a new physical disk drive.
The new drive may vary slightly in capacity as compared to the earlier failed drive. This slight capacity difference is due to the fact that the new drive may be purchased from different vendors or the model of the new drive may be different than the earlier drive which failed. For example, a 36 GB drive from one vendor may have slightly less or more capacity than 36 GB from a second vendor even if both vendors advertise the size of the drive to be of 36 GB capacity. This may also be true for the drives coming from the same vendor but possessing different models. Accordingly, when a drive of 36 GB fails, and is replaced by a new 36 GB drive of a different model or from a different vendor; the new drive may not have exactly 36 GB of capacity but vary by a fraction.
The variation in drive size by some fraction may lead to errors when large number of drives are used in an array thereby making overall volume of storage system to be slightly variant (approximately 2-3%) from the expected volume. When constructing or repairing a RAID, it is important to consider the actual size/capacity of the disks that are to be located within the array. If there are any size mismatches, then the array may not operate properly.
Prior art disk coercion techniques, such as the method shown in FIG. 1, are used to ensure disk capacity matches within the array. Disk coercion 101 may be basically described as an input/output algorithm wherein the disk size 102 is given as an input to obtain the coerced disk size 103 as an output. The disk size may also be provided as a block count of the disk 105 to get the coerced value of the respective block count 106. Disk coercion or drive coercion forces the drives within an array to use less than their full capacity so that when a drive fails and has to be replaced and if the replacement drive happens to be smaller, it is easily accommodated within the slightly reduced space on the disk. In principle, the coercion phenomenon forces the larger drives to use only the amount of capacity available on the smallest drive within the array. For instance in a RAID volume of 36, 35.7 and 36.5 GB drives, the 36 and 36.5 GB drives will be forced to use only 35.7 GB of their space.
The difficulty with prior art coercion techniques is identifying an appropriate coercion factor that reduces the available disk capacities below the smallest drive. One method that is used is coercing a disk within the array by a certain percentage factor, such as 2%, to ensure that its perceived capacity is smaller than the smallest disk within the array. However, as disk capacities within an array increase, the percentage factor may coerce the disk capacity by too little causing coercion to be ineffective.
A boundary based coercion method may be used which may allow an option to map out a reserved space to compensate for slightly smaller drive sizes that may be added later. In the boundary-based coercion, multiple disks are analyzed and their capacities are rounded down to an arbitrary boundary. However, such algorithms also lead to the size-matching problem as explained earlier. Further, as the difference between the size of the drive and the boundary increases, the amount of non-utilized storage and RAID inefficiencies increases.